.class public final Lcom/google/android/exoplayer/util/h;
.super Ljava/lang/Object;
.source "ParsableByteArray.java"


# instance fields
.field public a:[B

.field private b:I

.field private c:I


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>([BI)V
    .locals 0

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 3
    iput-object p1, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    .line 4
    iput p2, p0, Lcom/google/android/exoplayer/util/h;->c:I

    return-void
.end method


# virtual methods
.method public a()I
    .locals 2

    .line 4
    iget v0, p0, Lcom/google/android/exoplayer/util/h;->c:I

    iget v1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    sub-int/2addr v0, v1

    return v0
.end method

.method public a(I)V
    .locals 1

    if-ltz p1, :cond_0

    .line 5
    iget v0, p0, Lcom/google/android/exoplayer/util/h;->c:I

    if-gt p1, v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    invoke-static {v0}, Lcom/google/android/exoplayer/util/b;->a(Z)V

    .line 6
    iput p1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    return-void
.end method

.method public a([BI)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    .line 2
    iput p2, p0, Lcom/google/android/exoplayer/util/h;->c:I

    const/4 p1, 0x0

    .line 3
    iput p1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    return-void
.end method

.method public b()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/google/android/exoplayer/util/h;->b:I

    return v0
.end method

.method public b(I)V
    .locals 1

    .line 2
    iget v0, p0, Lcom/google/android/exoplayer/util/h;->b:I

    add-int/2addr v0, p1

    invoke-virtual {p0, v0}, Lcom/google/android/exoplayer/util/h;->a(I)V

    return-void
.end method

.method public c()I
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    iget v1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p0, Lcom/google/android/exoplayer/util/h;->b:I

    aget-byte v1, v0, v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x18

    add-int/lit8 v3, v2, 0x1

    iput v3, p0, Lcom/google/android/exoplayer/util/h;->b:I

    aget-byte v2, v0, v2

    and-int/lit16 v2, v2, 0xff

    shl-int/lit8 v2, v2, 0x10

    or-int/2addr v1, v2

    add-int/lit8 v2, v3, 0x1

    iput v2, p0, Lcom/google/android/exoplayer/util/h;->b:I

    aget-byte v3, v0, v3

    and-int/lit16 v3, v3, 0xff

    shl-int/lit8 v3, v3, 0x8

    or-int/2addr v1, v3

    add-int/lit8 v3, v2, 0x1

    iput v3, p0, Lcom/google/android/exoplayer/util/h;->b:I

    aget-byte v0, v0, v2

    and-int/lit16 v0, v0, 0xff

    or-int/2addr v0, v1

    return v0
.end method

.method public d()Ljava/lang/String;
    .locals 8

    .line 1
    invoke-virtual {p0}, Lcom/google/android/exoplayer/util/h;->a()I

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return-object v0

    .line 2
    :cond_0
    iget v0, p0, Lcom/google/android/exoplayer/util/h;->b:I

    .line 3
    :goto_0
    iget v1, p0, Lcom/google/android/exoplayer/util/h;->c:I

    const/16 v2, 0xd

    const/16 v3, 0xa

    if-ge v0, v1, :cond_1

    iget-object v1, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    aget-byte v4, v1, v0

    if-eq v4, v3, :cond_1

    aget-byte v1, v1, v0

    if-eq v1, v2, :cond_1

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 4
    :cond_1
    iget v1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    sub-int v4, v0, v1

    const/4 v5, 0x3

    if-lt v4, v5, :cond_2

    iget-object v4, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    aget-byte v6, v4, v1

    const/16 v7, -0x11

    if-ne v6, v7, :cond_2

    add-int/lit8 v6, v1, 0x1

    aget-byte v6, v4, v6

    const/16 v7, -0x45

    if-ne v6, v7, :cond_2

    add-int/lit8 v6, v1, 0x2

    aget-byte v4, v4, v6

    const/16 v6, -0x41

    if-ne v4, v6, :cond_2

    add-int/2addr v1, v5

    .line 5
    iput v1, p0, Lcom/google/android/exoplayer/util/h;->b:I

    .line 6
    :cond_2
    new-instance v1, Ljava/lang/String;

    iget-object v4, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    iget v5, p0, Lcom/google/android/exoplayer/util/h;->b:I

    sub-int v6, v0, v5

    invoke-direct {v1, v4, v5, v6}, Ljava/lang/String;-><init>([BII)V

    .line 7
    iput v0, p0, Lcom/google/android/exoplayer/util/h;->b:I

    .line 8
    iget v4, p0, Lcom/google/android/exoplayer/util/h;->c:I

    if-ne v0, v4, :cond_3

    return-object v1

    .line 9
    :cond_3
    iget-object v5, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    aget-byte v5, v5, v0

    if-ne v5, v2, :cond_4

    add-int/lit8 v0, v0, 0x1

    .line 10
    iput v0, p0, Lcom/google/android/exoplayer/util/h;->b:I

    if-ne v0, v4, :cond_4

    return-object v1

    .line 11
    :cond_4
    iget-object v0, p0, Lcom/google/android/exoplayer/util/h;->a:[B

    iget v2, p0, Lcom/google/android/exoplayer/util/h;->b:I

    aget-byte v0, v0, v2

    if-ne v0, v3, :cond_5

    add-int/lit8 v2, v2, 0x1

    .line 12
    iput v2, p0, Lcom/google/android/exoplayer/util/h;->b:I

    :cond_5
    return-object v1
.end method
